import Graphin, { Behaviors } from '@antv/graphin';
import '@antv/graphin-icons/dist/index.css';
import ProCard from '@ant-design/pro-card';

const { DragCanvas, ZoomCanvas } = Behaviors;

const RiskGraph = ({ data, loading }) => {
  // console.log('我是drawer的data', data)
  return (
    <ProCard loading={loading}>
      {data ? (
        <Graphin data={data} fitViewPadding="20">
          <ZoomCanvas />
          <DragCanvas />
        </Graphin>
      ) : null}
    </ProCard>
  );
};

export default RiskGraph;
